import requst from "../requst";
// 登录
//默认暴露
export default {
    getLoginQrCodeKeyApi() {
        return requst.get<any, any>('/login/qr/key')
    },
    getLoginQrCodeApi(key: string) {
        return requst.get<any, any>(`/login/qr/create?key=${key}&qrimg=true`)
    },
    getLoginQrCodeStatusApi(params: { key: string, timestamp: number, qrimg: boolean }) {
        return requst<any, any>({ url: `/login/qr/check`, method: 'GET', params })
    },
    getUserInfoApi(data: { cookie: string }) {
        return requst.post<any, any>(`/login/status?timestamp=${new Date().getTime()}`, data)
    },
    getLogoutApi() {
        return requst.get<any, any>(`/logout`)
    }
}